<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<div class='ui'>
    <table class='table_list'>
        <tr>
			<th>当时交易号</th>
			<th>品名</th>
			<th>二维码</th>
			<th>年份</th>
			<th>批次</th>
			<th>类型</th>
			<th>往价(元)</th>
			<th>现价(元)</th>
			<th>折扣</th>
			<th>折后价</th>
			<th>删除</th>
        </tr>
        <%-- <c:if test="${products ne null }"> --%>
        	<c:forEach items="${buyback_products}" var="info">
        	<tr>
        		<input type="hidden" name="product_id" value="${info.product_id }">
        		<td title='order_no'>${info.order_no }</td>
				<td title='product_name'>${info.product_name }</td>
				<td title='qrcode_id'>${info.qrcode_id }</td>
				<td title='productionyear'>${info.productionyear }</td>
				<td title='batch'>${info.batch }</td>
				<td title='myunit'>${info.myunit eq 0?'散装':'整装' }</td>
				<td title='now_price'>${info.now_price }</td>
				<td title='new_price'>${info.new_price }</td>
				<td title='discount'>
					<select onchange='selectchange(this);'>
						<option value='1'>无</option>
						<c:forEach items='${discounts }' var='discount'>
							<option value='${discount }'
								<c:if test="${discount eq info.discount }"> selected="selected"</c:if>
							>${discount }</option>
						</c:forEach>
					</select>
				</td>
				<td title='discount_price'>${info.discount_price}</td>
				<td><a href='javacript:;' onclick='delone(this);'>删除</a></td>
        	</tr>
        	</c:forEach>
        <%-- </c:if> --%>
    </table>
</div>